package Java0304;

import java.util.Scanner;

public class LengthDemo {
    public static void main(String[] args) {
        System.out.println("请输入需要的长度：（不切割零卖）");
        Scanner scan = new Scanner(System.in);
        double length = scan.nextDouble();
        int number = (int) (length / 3);
        if (length % 3 != 0) {
            System.out.println("顾客您需要购买" + (number + 1) + "根钢管");
        } else {
            System.out.println("顾客您需要购买" + number + "根钢管");
        }
    }
}
